home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Linux Cubed Series 7: Sunsite
/
Linux Cubed Series 7 - Sunsite Vol 1.iso
/
system
/
printing
/
pnmtoprt.0
/
pnmtoprt
/
pnmtoprt-2.0
/
README
< prev
next >
Wrap
Text File
|
1996-03-28
|
7KB
|
201 lines
pnmtoprt Version 2
pnmtoprt is a printer driver for NEC P6 compatible printers (mono and color) to
print PBM graphics.
The program only prints the PNM graphic 1:1. Scaling, dithering, smooting ...
must be done with the other PBM tools.
For example:
giftopnm girldemo.gif | pnmscale -xscale 4 -yscale 4 |\
pnmsmooth | pnmgamma 10 |\
ppmdither -dim 4 -red 2 -green 2 -blue 2 |\
pnmtoprt -d necp6_color -o 360x360dpi\
-o interlace_180 -o even=fff -o odd=fff >test.prt
lp -P??? test.prt
prints the gif file 'girldemo.gif'. (Try it. On my printer it looks quite
pretty :-)).
Try also the other example(s) in the file EXAMPLE.
The program supplies some options to prevent the white stripes in the
output which are typically for pinwriters.
usage: pnmtoprt -d driver [-o opt] [-h] [PNM - file]
-h .. help
Options for driver 'necp6_color'
-o 360x360dpi [default] (Max. width: 4896)
-o 180x180dpi (Max. width: 2446)
-o real360x360dpi (Max. width: 4896)
-o formfeed -o linefeed -o noreset -o noinit
-o x_margin=[-]pixel -o y_margin=[-]pixel
-o htabs=int (1/120'')
[-o interlace_360 | -o interlace_180]
[-o print_odd | -o print_even]
-o odd=(hex) [default: 333]
-o even=(hex) [default: ccc]
-o odd_cyan=(hex) -o even_cyan=(hex)
-o odd_magenta=(hex) -o even_magenta=(hex)
-o odd_yellow=(hex) -o odd_yellow=(hex)
-o even_black=(hex) -o even_black=(hex)
-o 360x360dpi:
Is the default resolution. The picture will be printed without any
improving.
-o 180x180dpi:
Prints with lower resolution.
!! With this option all other options for interlacing will be ignored!!
It makes no sense to beautify the output at low resolution ;-).
-o real360x360dpi:
Prints in "real" 360 dpi. The pinwriter normally can't print adjacent
pixels. With this option one line will be printed in two passes. One
pass for the even columns, one pass for the odd columns.
This option makes only sense when printing fulltone pictures. On
dithered pictures the effect can be cancelled because of the
dithering matrix.
-o formfeed:
Adds a formfeed after the picture. Without this option the next
picture will be printed just after the last picture. This option
is mutually exclusive to -o linefeed.
-o linefeed:
Adds a linefeed after the picture. Without this option the next
picture will be printed just after the last. This option is
mutually exclusive to -o formfeed.
-o noreset:
Doesn't reset the printer after printing the picture. Useful when
printing several pictures.
-o noinit:
Doesn`t init the printer before printing the picture. Also useful when
printing several pictures.
Both options noreset and noinit are useful to prevent the printer to
initialize between when printing several pictures in a row. On my
printer at the top of the paper when linefeed the head will always be
positioned in the middle of the paper to prevent a paper jam.
This costs time. With this option you can prevent this effect.
The following options activiate an additional 'interlaced' mode. This mode
can be combined with '-o 360x360dpi' and '-o real360x360dpi'.
-o interlace_360:
In 360 dpi mode one stripe consists of 48 pixels. In the first pass
the odd lines and in the second pass the even lines will be printed.
Between the passes there is a linefeed of 1/360'.
With this option the odd an the even lines of two adjacent stripes
will be interlaced.
-o interlace_180:
In this mode the 48 pixels of the stripe will be splitted in 24
lines (each 2 pixels high). The lines of two adjacent stripes will
be interlaced.
The following options can only be combined with '-o interlace_180':
-o odd=(hex byte):
Defines the mask for upper 12 double pixel rows of one stripe.
-o even=(hex byte):
Defines the mask for lower 12 double pixel rows of one stripe.
-o odd_<color>:
-o even_<color>:
Defines the mask for each color seperately. All other masks will keep
the default value.
The following option is for debugging purposes:
-o print_odd:
Prints only the odd lines.
-o print_even:
Prints only the even lines.
-o htabs=(integer) (1/120'')
When the distance between two empty columns is greater than the given
value the printer uses htabs to move the head. Usually this option is
turned off. This option will speed up printing but may not be compatible
with other printers. The =(integer) value is optinal. You can only
specify 'htabs' to get the default value.
-o x_margin=[-]pixel:
Defines the left margin of the picture in pixels. The value can also be a
negative number.
-o y_margin=[-]pixel
Defines the top margin of the picture in pixels. The value can also be a
negative number.
The interlacing works fine (without further tuning) with full tone pictures.
In this case the option '-o interlace_360' is enough.
When printing colored pictures you have to dither the picture. Depending on
the colors and the dithering matrix it can happen that one color is only
present on the even or on the odd lines.
In this case the effect of interlacing is canceled.
For this purpose you can use the '-o interlace_180' option with the possibility
of specifying your own interlace mask.
Normally the even and the odd mask should be exclusive so that no lines will
be printed twice.
But you can also define a mask of 'fff' for even and odd. Then each stripe will
be printed twice -- but interlaced. Then you have a very good output but
it needs much more color.
You can use other masks for example to replace a wrong printing pin of the
pinwriter.
To try different masks, you can use the options '-o print_odd' and
'-o print_even' to see the effect of the mask to the interlaced pictures.
You should define the mask in that way that both half-pictures have the some
amount of each color.
Speed (from fastest to slowest):
-o 180x180dpi:
One pass per stripe and color.
-o 360x360dpi:
Two passes per stripe and color. Between the two passes there is a
linefeed of 1/360'.
-o real360x360dpi:
Four passes per stripe and color. Two passes, one for odd and one for
the even columns, a linefeed of 1/360' and two passes again.
-o interlace_360:
No additional passes.
-o interlace_180:
prints interlaced. But in summary it doubles the passes.
(interlaced_360 sounds better than interlaced_180 but this isn't right.
you have more options and probably better results with
interlaced_180 ;-))
-o mask*:
no additional passes.
gamma correction:
I am using pnmgamma with a value of 10 for gamma correction. In my
distribution I missed this program after I had installed 'netpbm'.
I found the program in the source distribution.